home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / EffectDiscFortitude.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  2.0 KB  |  50 lines

  1. public class EffectDiscFortitude extends Codex {
  2.    private int _creatorGuid;
  3.    private int padGuid;
  4.  
  5.    public void EndEffect() {
  6.       CodexThing pad = new CodexThing(this.padGuid);
  7.       pad.Remove();
  8.       CodexActor _Creator = new CodexActor(this._creatorGuid);
  9.       ((CodexThing)_Creator).EndShell();
  10.    }
  11.  
  12.    public void restore(int flags) {
  13.       this.padGuid = CodexSequence.RestoreInt();
  14.       this._creatorGuid = CodexSequence.RestoreInt();
  15.    }
  16.  
  17.    public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration) {
  18.       this._creatorGuid = actorGuid;
  19.       CodexActor _Creator = new CodexActor(this._creatorGuid);
  20.       ((CodexThing)_Creator).SpawnThing("invshockwave");
  21.       ((CodexThing)_Creator).SetShell("redCloudShell_b", 20480, 0.0F, 0.9F, 1.0F, 1.0F);
  22.       this.padGuid = ((CodexThing)_Creator).SpawnThing("sawToothBlue");
  23.       float[] offset = new float[3];
  24.       offset[0] = offset[1] = offset[2] = 0.0F;
  25.       ((CodexThing)_Creator).AttachThing(this.padGuid, -1, offset, 1);
  26.       ((Codex)this).CaptureThing(this._creatorGuid);
  27.    }
  28.  
  29.    public void killed(int guid, int causeID, int captureID) {
  30.       this.EndEffect();
  31.    }
  32.  
  33.    public void soaked(int guid, int causeGUID, float damageAmount, int damageType, float soakAmount, int captureID) {
  34.       CodexActor _Creator = new CodexActor(this._creatorGuid);
  35.       if (soakAmount > 0.0F && soakAmount >= damageAmount) {
  36.          ((CodexThing)_Creator).SetShell("white", 20480, 0.0F, 1.0F, 1.0F, 1.0F);
  37.       }
  38.  
  39.    }
  40.  
  41.    public void save(int flags) {
  42.       CodexSequence.SaveInt(this.padGuid);
  43.       CodexSequence.SaveInt(this._creatorGuid);
  44.    }
  45.  
  46.    public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason) {
  47.       this.EndEffect();
  48.    }
  49. }
  50.